package com.zzzyh.service.impl;

import com.zzzyh.dao.UserDao;
import com.zzzyh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

//@Component("userService")
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    @Qualifier("userDao")
    UserDao userDao = null;

    public UserServiceImpl() {
        System.out.println("UserService无参构造");
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void save(){
        this.userDao.save();
    }
}

